Page({
  data: {
    threads: [
      { id: 1, name: '张三', avatar: '/assets/images/avatar1.jpg', lastMessage: '医生您好', time: '09:20' },
      { id: 2, name: '李四', avatar: '/assets/images/avatar2.jpg', lastMessage: '复查报告已上传', time: '昨天' }
    ]
  },
  openChat(e) {
    const id = e.currentTarget.dataset.id;
    wx.navigateTo({ url: `/pages/doctor/chat/chat?doctorId=1&consultationId=${Date.now()}&patientId=${id}` });
  }
});

